package com.lyeducation.services.base;

import com.lyeducation.core.base.BaseService;
import com.lyeducation.entities.base.BaseEntity;
import com.lyeducation.repository.base.BaseRepository;
import com.lyeducation.services.AbstractServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

public abstract class BaseServiceImpl<X extends BaseEntity> extends AbstractServiceImpl<X, String>
    implements BaseService<X> {
  @Autowired protected BaseRepository<X> baseRepository;

  @Override
  public void softDelete(X entity) {
    baseRepository.softDelete(entity);
  }

  @Override
  public X findById(String id){
    return baseRepository.findById(id);
  }
}
